import request from '@/utils/request'

//购物车管理
const SHOPPING_URL = 'api/admin/storeShoppingCart'

//购物车添加商品
export const addProductToShopping = (shopping)=>{
    return request.post(SHOPPING_URL,shopping)
}

//清空购物车
export const cleanShopping = (storeId)=>{
    return request.delete(SHOPPING_URL+'/clean/'+storeId)
}

//查看购物车
export const ShoppingList = (storeId) => {
    return request.get(SHOPPING_URL+'/list/'+storeId)
}

//删除购物车中一个商品
export const subShopping = (shopping) =>{
    return request.post(SHOPPING_URL+'/sub',shopping)
}